
def uniq(context, config)
  return true  unless config.key?(:key)

  entries = []
  store_keys = {}
  key = config[:key].to_sym

  context.entries.each do |entry|
    unless store_keys.key?(entry[key])
      entries << entry
      store_keys[entry[key]] = ''
    end
  end

  context.entries = entries
end

